﻿@page
@{ Layout = "_Layout"; }
@section Styles{
    <link href="/sitefiles/assets/lib/geeks/css/theme.min.css" rel="stylesheet" type="text/css" />
}
<div style="padding:0 8px;">
    <el-form v-on:submit.native.prevent :inline="true" :size="euiSize">
        <el-form-item label="关键字">
            <el-input v-model="form.keyWords" placeholder="组织、用户名、姓名" prefix-icon="el-icon-search" clearable></el-input>
        </el-form-item>
        <el-form-item label="状态">
            <el-select v-model="form.state" placeholder="" v-on:change="btnUserSearchClick" clearable>
                <el-option label="全部状态" value=""></el-option>
                <el-option label="未完成" value="Weiwancheng"></el-option>
                <el-option label="已完成" value="Yiwancheng"></el-option>
                <el-option label="已达标" value="Yidabiao"></el-option>
            </el-select>
        </el-form-item>
        <el-form-item>
            <el-button :size="euiSize" icon="el-icon-search" type="primary" v-on:click="btnUserSearchClick">查 询</el-button>
            <el-button :size="euiSize" plain type="primary" icon="el-icon-download" v-on:click="btnUserExportClick">
                导 出
            </el-button>
        </el-form-item>
    </el-form>
    <el-table ref="userTable" :data="userList" :size="euiSize"
              style="width: 100%">
        <el-table-column label="#"
                         type="index"
                         width="60"
                         align="left">
            <template scope="scope">
                <span>{{(form.pageIndex - 1) * form.pageSize + scope.$index + 1}}</span>
            </template>
        </el-table-column>
        <el-table-column label="账号">
            <template slot-scope="scope">
                <el-link :underline="false" type="primary" v-on:click="btnViewClick(scope.row.user.id)">{{scope.row.user.userName}}</el-link>
            </template>
        </el-table-column>
        <el-table-column prop="user.displayName" label="姓名">
        </el-table-column>
        <el-table-column prop="user.organNames" label="组织" show-overflow-toolti>
        </el-table-column>
        <el-table-column label="必修课">
            <template slot-scope="scope">
                {{ scope.row.overCourse }}/{{ scope.row.plan.totalCount }}
            </template>
        </el-table-column>
        <el-table-column label="选修课">
            <template slot-scope="scope">
                {{ scope.row.overSelectCourse }}/{{ scope.row.plan.selectTotalCount }}
            </template>
        </el-table-column>
        <el-table-column prop="totalCredit" label="完成学分">
        </el-table-column>
        <el-table-column label="必修学分">
            <template slot-scope="scope">
                {{ scope.row.overCredit }}/{{ scope.row.credit }}
            </template>
        </el-table-column>
        <el-table-column label="选修学分">
            <template slot-scope="scope">
                {{ scope.row.overSelectCredit }}/{{ scope.row.selectCredit }}
            </template>
        </el-table-column>
        <el-table-column prop="maxScore" label="大考成绩" width="100">
        </el-table-column>
        <el-table-column prop="stateStr" label="状态" width="100" align="right">
        </el-table-column>
        @await Html.PartialAsync("_PartialTableEmpty")
    </el-table>

    <div style="text-align: center; margin-top: 10px;">
        <el-pagination v-on:current-change="userHandleCurrentChange" background
                       :current-page="form.pageIndex"
                       :page-size="form.pageSize"
                       layout="total, prev, pager, next"
                       :total="userTotal">
        </el-pagination>
    </div>
</div>
@section Scripts{
    <script src="/sitefiles/assets/js/admin/study/studyPlanManagerUser.js" type="text/javascript"></script>
}